<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <script type="text/javascript" src="js/jquery-1.2.6.js"></script>
    <script type="text/javascript" src="js/message_panel.js"></script>
    <script type="text/javascript" src="lib.js"></script>
    <link type="text/css" rel="stylesheet" href="style/style.css"/>
    <script type="text/javascript" src="plugin/artDialog.js?skin=green"></script>
    <script type="text/javascript">
        document.write('<script type="text/javascript" src="js/'+getQueryStr("language")+'.js"><\/script>');
    </script>
    <script type="text/javascript">
        function getHeight(){

            var yScroll;

            if (window.innerHeight && window.scrollMaxY) {
                yScroll = window.innerHeight + window.scrollMaxY;
            } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
                yScroll = document.body.scrollHeight;
            } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
                yScroll = document.body.offsetHeight;
            }

            var windowHeight;
            if (self.innerHeight) { // all except Explorer
                windowHeight = self.innerHeight;
            } else if (document.documentElement && document.documentElement.clientHeight) {
                // Explorer 6 Strict Mode
                windowHeight = document.documentElement.clientHeight;
            } else if (document.body) { // other Explorers
                windowHeight = document.body.clientHeight;
            }

            // for small pages with total height less then height of the viewport
            if(yScroll < windowHeight){
                pageHeight = windowHeight;
            } else {
                pageHeight = yScroll;
            }
            return pageHeight;
        }

        function getWidth(){

            var xScroll

            if (window.innerHeight && window.scrollMaxY) {
                xScroll = document.body.scrollWidth;
            } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
                xScroll = document.body.scrollWidth;
            } else {
                xScroll = document.body.offsetWidth;
            }

            var windowWidth
            if (self.innerHeight) { // all except Explorer
                windowWidth = self.innerWidth;
            } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
                windowWidth = document.documentElement.clientWidth;
            } else if (document.body) { // other Explorers
                windowWidth = document.body.clientWidth;
            }

            if(xScroll < windowWidth){
                pageWidth = windowWidth;
            } else {
                pageWidth = xScroll;
            }


            return pageWidth;
        }
    </script>
    <title>WROC</title>
</head>

<body class="gui">

<div id="wrapper" >
<div id="content">
<div id="header">
<div class="logoST" id="logo">
    <h1>Control Panel</h1>
</div>


<div id="fath" style="visibility:hidden">

<div id="net_menu">
<div class="menu">
<div class="menuMain">
<ul class="menuMainList">
<li id="net_wan" class="current">
<span>
<strong>
    <label sid="menu.internet_settings"></label>
</strong>
</span>

    <div class="menuSub" style="display: block;">
        <ul class="menuSubList">
            <li class="current">
                <a id="wan_main_load" class="current">
                    <strong>
                        <label sid="menu.wan" defaultVal="WAN"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="lan_main_load">
                    <strong>
                        <label sid="menu.lan" defaultVal="LAN"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="dhcp_main_load">
                    <strong>
                        <label sid="dhcp.menu" defaultVal="DHCP server"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="dhcpclient_main_load">
                    <strong>
                        <label sid="menu.dhcp_clients" defaultVal="DHCP clients"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="net_wireless_basic">
<span>
<strong>
    <label sid="menu.wireless_settings"></label>
</strong>
</span>

    <div class="menuSub" style="display: none;">
        <ul class="menuSubList">
            <li>
                <a id="wireless_basic_main_load" class="current">
                    <strong>
                        <label sid="menu.basic"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="security_main_load">
                    <strong>
                        <label sid="menu.security"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="wireless_advanced_main_load">
                    <strong>
                        <label sid="menu.advance"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="wps_main_load">
                    <strong>
                        <label sid="menu.wps"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="wds_main_load">
                    <strong>
                        <label sid="menu.wds"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="mac_filtering_main_load">
                    <strong>
                        <label sid="menu.mac_filtering"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="state_list_main_load">
                    <strong>
                        <label sid="menu.station_list"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="net_port_filtering">
<span>
<strong>
    <label sid="menu.firewall"></label>
</strong>
</span>

    <div class="menuSub" style="display: none;">
        <ul class="menuSubList">
            <li>
                <a id="port_filtering_main_load" class="current">
                    <strong>
                        <label sid="menu.ip_port_filtering"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="content_filtering_main_load">
                    <strong>
                        <label sid="menu.content_filtering"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="system_firewall_main_load">
                    <strong>
                        <label sid="menu.system_firewall"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="net_qos">
<span>
<strong>
    <label sid="menu.qos"></label>
</strong>
</span>

    <div class="menuSub" style="display: none;">
        <ul class="menuSubList">
            <li>
                <a id="qos_main_load" class="current">
                    <strong>
                        <label sid="qos.str"></label>
                    </strong>
                </a>
            </li>
            <li id="upload" style="display:none;">
                <a id="qosuploadrule_main_load">
                    <strong>
                        <label sid="qos.upload_title"></label>
                    </strong>
                </a>
            </li>
            <li id="download" style="display:none;">
                <a id="qosdownrule_main_load">
                    <strong>
                        <label sid="qos.download_title"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="net_virtual_set">
<span>
<strong>
    <label sid="menu.yinyong"></label>
</strong>
</span>

    <div class="menuSub" style="display: none;">
        <ul class="menuSubList">
            <li>
                <a id="virtual_set_main_load" class="current">
                    <strong>
                        <label sid="menu.virtual_set"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="port_forward_main_load">
                    <strong>
                        <label sid="menu.port_forward"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="dmz_main_load">
                    <strong>
                        <label sid="menu.dmz"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="upnp_main_load">
                    <strong>
                        <label sid="menu.upnp"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="usbStorage">
                    <strong>
                        <label sid="usb.usb"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="usb_print">
                    <strong>
                        <label sid="usbprint.title"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="net_routing">
<span>
<strong>
    <label sid="menu.adv_cfg"></label>
</strong>
</span>

    <div class="menuSub" style="display: none;">
        <ul class="menuSubList">
            <li>
                <a id="routing_main_load" class="current">
                    <strong>
                        <label sid="routing.title"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="systime_main_load">
                    <strong>
                        <label sid="menu.systime"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="ddns_main_load">
                    <strong>
                        <label sid="menu.ddns"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
</ul>
</div>
</div>
</div>

<div id="cdr_menu" style="display:none">
<div class="menu">
<div class="menuMain">
<ul class="menuMainList">
<li id="cdr_Dialing" class="current">
<span>
<strong>
    <label sid="ivr_menu.basic"></label>
</strong>
</span>

    <div class="menuSub" style="display:block">
        <ul class="menuSubList">
            <li>
                <a id="Dialing_main_load" class="current">
                    <strong>
                        <label sid="ivr_menu.dialing"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="auto_call_main_load">
                    <strong>
                        <label sid="ivr_menu.auto_call"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="tts_main_load">
                    <strong>
                        <label sid="ivr_menu.tts"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="domain_main_load">
                    <strong>
                        <label sid="ivr_menu.domains"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="cdr_extension">
<span>
<strong>
    <label sid="ivr_menu.extension_config"></label>
</strong>
</span>

    <div class="menuSub">
        <ul class="menuSubList">
            <li>
                <a id="extension_main_load" class="current">
                    <strong>
                        <label sid="ivr_menu.extension"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="ip_extension_main_load">
                    <strong>
                        <label sid="ivr_menu.ip_extension"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="ip_extension_reg_main_load">
                    <strong>
                        <label sid="ivr_menu.ip_reg"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="group_main_load">
                    <strong>
                        <label sid="ivr_menu.group"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="cdr_trunk">
<span>
<strong>
    <label sid="ivr_menu.trunk_config"></label>
</strong>
</span>

    <div class="menuSub">
        <ul class="menuSubList">
            <li id="trunk">
                <a id="trunk_main_load" class="current">
                    <strong>
                        <label sid="ivr_menu.trunk"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="ip_trunk_main_load">
                    <strong>
                        <label sid="ivr_menu.ip_trunk"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li id="cdr_Analog_trunk">
<span>
<strong>
    <label sid="ivr_menu.system"></label>
</strong>
</span>

    <div class="menuSub">
        <ul class="menuSubList">
            <li>
                <a id="Analog_trunk_main_load" class="current">
                    <strong>
                        <label sid="ivr_menu.fxooptional"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="lineoptional_main_load">
                    <strong>
                        <label sid="ivr_menu.lineoptional"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="ivr_main_load">
                    <strong>
                        <label sid="ivr_menu.ivr"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="call_records_main_load">
                    <strong>
                        <label sid="ivr_menu.call_records"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="featurecfg_main_load">
                    <strong>
                        <label sid="ivr_menu.featurecfg"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="digitmapcfg_main_load">
                    <strong>
                        <label sid="ivr_menu.digitmapcfg"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="tone_main_load">
                    <strong>
                        <label sid="ivr_menu.tone"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="safe_main_load">
                    <strong>
                        <label sid="ivr_menu.safe"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
<li class="cdr_Systemcfg">
<span>
<strong>
    <label sid="ivr_menu.advanced"></label>
</strong>
</span>

    <div class="menuSub">
        <ul class="menuSubList">
            <li>
                <a id="Systemcfg_main_load" class="current">
                    <strong>
                        <label sid="ivr_menu.systemcfg"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="voip_main_load">
                    <strong>
                        <label sid="ivr_menu.voip"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="sipoptional_main_load">
                    <strong>
                        <label sid="ivr_menu.sip"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="routecfg_main_load">
                    <strong>
                        <label sid="ivr_menu.route"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="encrypt_main_load">
                    <strong>
                        <label sid="ivr_menu.encrypt"></label>
                    </strong>
                </a>
            </li>
            <li>
                <a id="api_main_load">
                    <strong>
                        <label sid="ivr_menu.api"></label>
                    </strong>
                </a>
            </li>
        </ul>
    </div>
</li>
</ul>
</div>
</div>
</div>

<div id="manage_menu" style="display:none">
    <div class="menu">
        <div class="menuMain">
            <ul class="menuMainList">

                <li id="changepassword_main_load" class="current">
                 <span>
                   <strong><label sid="tools.td1"></label></strong>
                  </span>
                </li>

                <li id="softupload_main_load">
                   <span>
                   <strong><label sid="tools.td2"></label></strong>
                   </span>
                </li>
                <li id="downcfg_main_load">
                        <span>
                            <strong><label sid="menu.settings_management"></label></strong>
                       </span>
                </li>
                <!-- <li id="fxocapture_main_load">
                       <span>
                            <strong><label sid="tools.td8"></label></strong>
                        </span>
                </li>-->
                <!--   <li id="tcpdump_main_load">
                        <span>
                            <strong><label sid="tools.td9"></label></strong>
                        </span>
                </li>-->
                <li id="tools_main_load">
                        <span>
                            <strong><label sid="menu.system_management"></label></strong>
                       </span>
                </li>
            </ul>
        </div>
    </div>
</div>

<div id="status_menu" style="display:none;">
    <div class="menu">
        <div class="menuMain">
            <ul class="menuMainList">
                <li id="wrom_status_main_load" class="current">
                 <span>
                   <strong><label sid="overview.status_link"></label></strong>
                  </span>
                </li>

                <li id="wrom_statistics_main_load">
                 <span>
                   <strong><label sid="overview.statistic_link"></label> </strong>
                  </span>
                </li>

                <li id="downlog_main_load">
                 <span>
                   <strong><label sid="menu.logs_manage"></label> </strong>
                  </span>
                </li>

                <li id="resinfo">
                <span>
               <strong><label sid="menu.logs_system"></label></strong>
                </span>
                </li>

                <li id="msglogcfg_main_load">
                 <span>
                 <strong><label sid="menu.logs_call"></label></strong>
                 </span>
                </li>

                <li id="prtinfo_main_load" class="current">
                <span>
                 <strong>
                     <label sid="menu.version"></label>
                 </strong>
               </span>
                </li>
                <li id="list_custom">
                  <span>
                   <strong>
                       <label sid="msg.menu"></label>
                   </strong>
                  </span>
                </li>

            </ul>
        </div>
    </div>
</div>
</div>
</div>
<!--main page!-->
<div id="mainAndHelp" style="visibility:hidden">

</div>
<div id="floatKiller"></div>
<div id="statusInfo">

    <div class="info"><span id="loginuser"></span></div>
    <div class="info">
        <button class="logout" onclick="reboot();"><img src="images/reboot.gif" border="0">&#160;
            <label sid="tools.td10"></label>
        </button>
        <button class="logout" onclick="logout();"><img src="images/logout.gif" border="0">&#160;
            <label sid="share.logout"></label>
        </button>
        <button id="callback" class="logout"><img src="images/callback.png" border="0">&#160;
            <label sid="share.back"></label>
        </button>

    </div>
</div>
</div>
</div>


<div id="lock_div">&nbsp; </div>
<div id="lock_div2">&nbsp;</div>
<div id="message_panel"><span id="mess">&nbsp;</span><br/>
    <br/>
    <img src="images/jd.gif"/>
</div>
<div id="rightMenu" style="display: none">
    <ul>
        <li id="editWords">Edit</li>
        <li id="defaultValue">Default</li>
    </ul>
</div>
<script type="text/javascript">




$(document).ready(function () {
    if(!$.browser.safari){
        $(".menuMainList").addClass("menu_hover");
        $(".menuSubList").addClass("menuSubList_hover");
    }

    $("#lock_div").show();
    $("#lock_div").css("height",$(document).height())
    var left = getWidth()/2-150;
    var top = getHeight()/2;
    $("#message_panel").css("left",left);
    $("#message_panel").css("top",top);
    $("#message_panel").fadeIn();
    $("#mess").html(unCompileJsonVal(decodeURIComponent(guideInfo.loading)));
    if(state){
    }else{
        stop_message();
    }

    window.setTimeout(function(){
        $("#message_panel").fadeOut();
        $("#fath,#mainAndHelp").css("visibility","visible");
        $("#lock_div").hide();
        state = true;
    },2000);
    $("label").each(function () {

        var values =eval($(this).attr("sid"));
        $(this).html(decodeURIComponent(values));

    });

    $(".menuMainList").find("li").bind("click", function(event) {
        $(this).siblings().removeClass("current").find("div:eq(0)").hide();
        $(this).addClass("current").find(".menuSub").show(200);
        var loadHtm = $(this).find("div.menuSub>ul>li>a:eq(0)").attr("id");
        $("#" + loadHtm).click();
        event.stopPropagation();
    });

    $("#status_menu,#manage_menu").find("li").bind("click",function(event){
        $(this).siblings().removeClass("current");
        $(this).addClass("current");

        $("#mainAndHelp").empty();
        var showId = $(this).attr("id");
        var showHtm = showId + ".htm";
        loadNewHtml(showHtm);

    });


    $(".menuSubList > li").bind("click", function (event) {
        $(this).siblings().find("a").removeClass("current");
        $(this).find("a").addClass("current");
        $("#mainAndHelp").empty();
        var showId = $(this).find("a").attr("id");
        var showHtm = showId + ".htm";

        $("#mainAndHelp").load(showHtm, function () {
            var url="xml?method=gw.config.language&id=75&tmp="+Math.random();

            $.get(url,function (data) {
                var stat=$(data).find("rsp").attr("stat");
                if(stat=="fail") {
                    $(data).find('Error').each(function () {
                        var code=$(this).attr('code');
                        if(code==4) {
                            alert(cannotModify);
                        }else if(code==5) {
                            gotologin();
                        }
                    });
                }
            });

            $("label").each(function () {
                var currentVal =$(this);
                var values = eval($(this).attr("sid"));
                if(typeof(values)!=="undefined"){
                    $(this).html(unCompileJsonVal(decodeURIComponent(values)));
                    $(this).rightClick(function(){
                        if(currentVal.attr("sid")) {
                            showEditDialog(currentVal);
                            currentVal.addClass("EditPosition");
                        }
                    })

                }

                if($(this).html()=="" && $(this).parent().hasClass("definition")){
                    $(this).parent().hide();
                    $(this).parent().prev().hide();
                }
            });

            $("button").each(function(){
                var currentButton =$(this);
                var ButtonVal = currentButton.find("label");
                $(this).rightClick(function(){
                    if(ButtonVal.attr("sid")) {
                        showEditDialog(ButtonVal);
                        ButtonVal.addClass("EditPosition");
                    }
                })
            });


            $("option").each(function(){
                var values =eval($(this).attr("sid"));
                if(typeof(values)!=='undefined'){
                    $(this).text(unCompileJsonVal(decodeURIComponent(values)));
                }

            });

            $("select").each(function(){
                var obj2 =$(this);
                $(this).rightClick(function(){
                    var selectVal = obj2.find("option:selected");
                    showEditDialog(selectVal);
                    selectVal.addClass("EditPosition");
                })

            });

            $("input[type='button']").each(function () {
                $(this).val(unCompileJsonVal(decodeURIComponent(eval($(this).attr("sid")))));
                var currentButton =$(this);
                $(this).rightClick(function(){
                    showEditDialog(currentButton,'val');
                    currentButton.addClass("EditPosition");
                })


            });

            setTimeout("height_div()",500);
            $("#contents").bind("click",function(){
                height_div();
            });

        });
        event.stopPropagation();
    });
    if (window.XMLHttpRequest) {
        appjoy.util.goTopTxt=unCompileJsonVal(decodeURIComponent(guideInfo.toTop));
        appjoy.util.gotoTop(true);
        $(window).bind("scroll", appjoy.util.gotoTop);
        $(".x-backToTop").rightClick(function(){
            var currentTop =$(".x-backToTop");
            showEditDialog(currentTop);
            currentTop.addClass("EditPosition");
        })
    }
    $("#callback").bind('click', function () {
        window.location.href = "menuGuide.htm?type=" + getQueryStr("backtype") + "&language=" + getQueryStr("language");
    });
    var obj = {

        init:function () {
        },
        condition:"",
        excute:function () {

            this[this.condition].apply(this);

            this.destroy();

        },
        net:function () {
            $(".menuMainList >li:eq(0)").click();
            $("#fath").find("#net_menu").show().siblings().hide();
        },
        phone:function () {
            $("#fath").find("#cdr_menu").show().siblings().hide();
            $("#Dialing_main_load").click();

        },
        manage:function () {
            $("#fath").find("#manage_menu").show().siblings().hide();
            $("#changepassword_main_load").click();

        },
        status:function () {
            $("#fath").find("#status_menu").show().siblings().hide();
            $("#wrom_status_main_load").click();

        },
        destroy:function () {

        }
    };
    var urlPost = getQueryStr("urlType");
    obj.condition = urlPost;

    obj.excute();

});


</script>
</body>


<script type="text/javascript" src="js/message_panel.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<script type="text/javascript" src="js/validatorRegex.js"></script>
</html>